package com.cy.personer.biz.impl;

import com.cy.personer.bean.Card;
import com.cy.personer.bean.User;
import com.cy.personer.biz.UserBiz;
import com.cy.personer.ceptor.OperationLog;
import com.cy.personer.mapper.UserMapper;
import org.springframework.stereotype.Repository;

import javax.annotation.Resource;

@Repository
public class UserBizImpl implements UserBiz {
    @Resource
    private UserMapper userMapper;

    //为用户建卡
    @Override
    public boolean addUser(User user) {
        return userMapper.addUser(user);
    }

    //用户自己注册帐号
    @Override
    public boolean userRegister(User user) {
        return userMapper.userRegister(user);
    }

    //检测该卡号是否可用
    @Override
    public User cardNumberCheck(String cardNumber) {
        return userMapper.cardNumberCheck(cardNumber);
    }

    @Override
    public User getUserData(User user) {
        return userMapper.getUser(user);
    }

    //检验用户名是否可用
    @Override
    public User userAccountCheck(String userAccount) {
        return userMapper.userAccountCheck(userAccount);
    }

    //前台用户登录
    @Override
    public User userLogin(User user) {
        return userMapper.userLogin(user);
    }

    //查询用户信息
    @Override
    public User getUser(User user) {
        return userMapper.getUser(user);
    }

    //验证持卡人和用户的真实性名是否一致
    @Override
    public User userNameCheck(User user) {
        return userMapper.userNameCheck(user);
    }
}
